home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / hm--html-menus / hm--html-configuration.el.z / hm--html-configuration.el
Encoding:
Text File  |  1998-05-21  |  35.3 KB  |  1,041 lines

  1. ;;; hm--html-configuration.el - Configurationfile for the html-mode
  2. ;;;
  3. ;;; $Id: hm--html-configuration.el,v 5.2 1997/07/20 06:36:20 muenkel Exp $
  4. ;;;
  5. ;;; Copyright (C) 1993 - 1997  Heiko Muenkel
  6. ;;; email: muenkel@tnt.uni-hannover.de
  7. ;;;
  8. ;;;  This program is free software; you can redistribute it and/or modify
  9. ;;;  it under the terms of the GNU General Public License as published by
  10. ;;;  the Free Software Foundation; either version 2, or (at your option)
  11. ;;;  any later version.
  12. ;;;
  13. ;;;  This program is distributed in the hope that it will be useful,
  14. ;;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. ;;;  GNU General Public License for more details.
  17. ;;;
  18. ;;;  You should have received a copy of the GNU General Public License
  19. ;;;  along with this program; if not, write to the Free Software
  20. ;;;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. ;;;
  22. ;;; 
  23. ;;; Description:
  24. ;;;
  25. ;;;    This file is for the system wide configuration of the html mode.
  26. ;;;    User specific configuration should be done in the file
  27. ;;;    ~/.hm--html-configuration.el, which precedes the settings in
  28. ;;;    this file.
  29. ;;;    All settings in this file are done with defvar's, therefore
  30. ;;;    you could overwrite them also with the function setq in your
  31. ;;;    .emacs or default.el and so on.
  32. ;;; 
  33. ;;; Installation: 
  34. ;;;   
  35. ;;;    Put this file in one of your lisp load path directories or
  36. ;;;    set the environment variable HTML_CONFIG_FILE to this file.
  37. ;;;    For example: 
  38. ;;;       setenv HTML_CONFIG_FILE "~/data/hm--htm-environment.el"
  39. ;;;      if you have put this file in the directory "~/data/"
  40. ;;;
  41.  
  42. ;(require 'adapt)
  43.  
  44. (defgroup hm--html nil
  45.   "A package for writing HTML pages.
  46. It provides a major mode and a minor mode. The minor mode can be
  47. used together with the psgml html-mode."
  48.   :group 'hypermedia)
  49.  
  50. (defgroup hm--html-files nil
  51.   "hm--html configuration files."
  52.   :group 'hm--html)
  53.  
  54. (defgroup hm--html-document-information nil
  55.   "Variables relating to the insertation of document information.
  56. This contains the user name of the document author, his signature,
  57. the creation and change dates, the HTML doctype and the meta element."
  58.   :group 'hm--html)
  59.  
  60. (defgroup hm--html-menus nil
  61.   "Variables relating to the pulldown and popup menus."
  62.   :group 'hm--html)
  63.  
  64. (defgroup hm--html-links nil
  65.   "Variables relating to the insertation of links."
  66.   :group 'hm--html)
  67.  
  68. (defgroup hm--html-templates nil
  69.   "Variables relating to inserting HTML templates."
  70.   :group 'hm--html)
  71.  
  72. (defgroup hm--html-keys nil
  73.   "Variables relating to the key and mouse bindings and drag and drop."
  74.   :group 'hm--html)
  75.  
  76. (defgroup hm--html-display nil
  77.   "Variables relating to the display of the HTML sources and the previewing."
  78.   :group 'hm--html)
  79.  
  80. (defgroup hm--html-hooks nil
  81.   "Hooks relating to the hm--html modes."
  82.   :group 'hm--html)
  83.  
  84. (defgroup hm--html-indentation nil
  85.   "Variables relating to the indentation in the `hm--html-mode'."
  86.   :group 'hm--html)
  87.  
  88.  
  89. ;;; The User config file (an proposal of Manoj Srivastava)
  90. (defcustom hm--html-user-config-file nil
  91.   "*The location of the users config file.
  92. This variable will only be used, if no environment variable
  93. \"HTML_USER_CONFIG_FILE\" is set. 
  94. Example value: \"~/.hm--html-configuration.el\".
  95.  
  96. If this is set to nil and no \"HTML_USER_CONFIG_FILE\" is set,
  97. then the file ~/.hm--html-configuration.el will be used. In this case
  98. also the variable `init-file-user' will be respected."
  99.   :group 'hm--html-files
  100.   :type '(choice (const :tag "~/.hm--html-configuration.el" :value nil)
  101.          file))
  102.  
  103. ;;; The site specific config file
  104. (defcustom hm--html-site-config-file nil
  105.   "*The location of a site specific config file.
  106. This variable will only be used, if no environment variable
  107. \"HTML_SITE_CONFIG_FILE\" is set."
  108.   :group 'hm--html-files
  109.   :type '(choice (const :tag "No Site Specific Configuration" :value nil)
  110.          file))
  111.  
  112. ;;; Chose the initial popup menu
  113. (defcustom hm--html-expert nil
  114.   "*t    : Use the HTML expert popup menu,
  115. nil : Use the HTML novice (simple) menu.
  116.  
  117. NOTE: In the Emacs 19 you should set this variable only before 
  118.       loading the mode."
  119.   :group 'hm--html-menus
  120.   :type '(choice (const :tag "Use Expert Popup Menu" :value t)
  121.          (const :tag "Use Novice Popup Menu" :value nil)))
  122.  
  123. ;;; Your Signature
  124.  
  125. (defcustom hm--html-signature-file nil 
  126.   "*Your Signature file.
  127. For example: \"http://www.tnt.uni-hannover.de:80/data/info/www/tnt/info/tnt/whois/muenkel.html\"."
  128.   :group 'hm--html-document-information
  129.   :type '(choice (const :tag "No Signature file" :value nil)
  130.          string))
  131.  
  132.  
  133. (defcustom hm--html-username nil
  134.   "*Your Name for the signature. For example: \"Heiko Mⁿnkel\"."
  135.   :group 'hm--html-document-information
  136.   :type '(choice (const :tag "Use Value Of `(user-full-name)'" :value nil)
  137.          string))
  138.  
  139.  
  140. ;;; HTML Doctype
  141. (defcustom hm--html-html-doctype-version "-//W3C//DTD HTML 3.2 Final//EN"
  142.   "*The HTML version. This is used in the doctype element."
  143.   :group 'hm--html-document-information
  144.   :type 'string)
  145.  
  146.  
  147. ;;; Your favorite server (eg: the name of the host of your own http server)
  148. ;;; This is used in some other variables
  149.  
  150. (defcustom hm--html-favorite-http-server-host-name "www.tnt.uni-hannover.de"
  151.   "*The name of your favorite http server host. It must be specified !"
  152.   :group 'hm--html-links
  153.   :type 'string)
  154.  
  155.  
  156. ;;; For links to Info Gateways
  157.  
  158. (defcustom hm--html-info-hostname:port-alist
  159.   '(("www.tnt.uni-hannover.de:8005"))
  160.   "*Alist with hostnames and ports for the Info gateway."
  161.   :group 'hm--html-links
  162.   :type '(repeat string))
  163.  
  164. (defcustom hm--html-info-hostname:port-default "www.tnt.uni-hannover.de:8005"
  165.   "*Default hostname with port for the Info gateway."
  166.   :group 'hm--html-links
  167.   :type 'string)
  168.  
  169. (defcustom hm--html-info-path-alist '((1 . "/appl/lemacs/Global/emacs/info")
  170.                       (2 . "/appl/emacs/info")
  171.                       (3 . "/appl/gnu/Global/info")
  172.                       (4 . "/appl/emacs-19/Global/info")
  173.                       (5 . "/"))
  174.   "*Alist with directories for the Info gateway."
  175.   :group 'hm--html-links
  176.   :type '(repeat cons))
  177.  
  178.  
  179. ;;; For links to WAIS Gateways
  180.  
  181. (defcustom hm--html-wais-hostname:port-alist '(("www.tnt.uni-hannover.de:8001")
  182.                            ("info.cern.ch:8001"))
  183.   "*Alist with hostnames and ports for the WAIS gateway."
  184.   :group 'hm--html-links
  185.   :type '(repeat string))
  186.  
  187. (defcustom hm--html-wais-hostname:port-default "www.tnt.uni-hannover.de:8001"
  188.   "*Default hostname with port for the WAIS gateway."
  189.   :group 'hm--html-links
  190.   :type 'string)
  191.  
  192. (defcustom hm--html-wais-servername:port-alist 
  193.   '(("wais.tnt.uni-hannover.de:210")
  194.     ("daedalus.tnt.uni-hannover.de:21408")
  195.     ("ikarus.tnt.uni-hannover.de:21401"))
  196.   "*Alist with servernames and ports for the WAIS gateway."
  197.   :group 'hm--html-links
  198.   :type '(repeat string))
  199.  
  200. (defcustom hm--html-wais-servername:port-default "www.tnt.uni-hannover.de:210"
  201.   "*Default servername with port for the WAIS gateway."
  202.   :group 'hm--html-links
  203.   :type 'string)
  204.  
  205. (defcustom hm--html-wais-path-alist nil
  206.   "*Alist with directories for the wais gateway."
  207.   :group 'hm--html-links
  208.   :type '(repeat string))
  209.  
  210.  
  211. ;;; For links to HTML servers
  212.  
  213. (defcustom hm--html-html-hostname:port-alist '(("www.tnt.uni-hannover.de:80")
  214.                            ("vxcrna.cern.ch:80")
  215.                            ("www.ncsa.uiuc.edu:80"))
  216.   "*Alist with hostnames and ports for the HTML server."
  217.   :group 'hm--html-links
  218.   :type '(repeat string))
  219.  
  220. (defcustom hm--html-html-hostname:port-default "www.tnt.uni-hannover.de:80"
  221.   "*Default hostname with port for the HTML server."
  222.   :group 'hm--html-links
  223.   :type 'string)
  224.  
  225. (defcustom hm--html-html-path-alist '((1 . "/data/info/www/tnt/")
  226.                       (2 . "/data/info/www/")
  227.                       (3 . "/data/info/")
  228.                       (4 . "/data/")
  229.                       (5 . "/appl/")
  230.                       (6 . "/project/")
  231.                       (7 . "~/")
  232.                       (8 . "/"))
  233.   "*Alist with directories for the HTML server."
  234.   :group 'hm--html-links
  235.   :type '(repeat cons))
  236.  
  237.  
  238. ;;; For links to file gateways
  239.  
  240. (defcustom hm--html-file-path-alist '((1 . "/data/info/www/tnt/")
  241.                       (2 . "/data/info/www/")
  242.                       (3 . "/data/info/")
  243.                       (4 . "/data/")
  244.                       (5 . "/appl/")
  245.                       (6 . "/project/")
  246.                       (7 . "~/")
  247.                       (8 . "/"))
  248.   "*Alist with directories for the file gateway."
  249.   :group 'hm--html-links
  250.   :type '(repeat cons))
  251.  
  252.  
  253. ;;; For links to ftp servers
  254.  
  255. (defcustom hm--html-ftp-hostname:port-alist
  256.   '(("ftp.tnt.uni-hannover.de")
  257.     ("ftp.rrzn.uni-hannover.de")
  258.     ("wega.informatik.uni-hannover.de")
  259.     ("rusmv1.rus.uni-stuttgart.de")
  260.     ("export.lcs.mit.edu")
  261.     )
  262.   "*Alist with hostnames and ports for the ftp server."
  263.   :group 'hm--html-links
  264.   :type '(repeat string))
  265.  
  266. (defcustom hm--html-ftp-hostname:port-default "ftp.rrzn.uni-hannover.de"
  267.   "*Default hostname with port for the ftp server."
  268.   :group 'hm--html-links
  269.   :type 'string)
  270.  
  271. (defcustom hm--html-ftp-path-alist '((1 . "/pub")
  272.                      (2 . "/pub/gnu")
  273.                      (3 . "/pub/linux")
  274.                      (4 . "/pub/unix")
  275.                      (5 . "/incoming")
  276.                      (6 . "/"))
  277.   "*Alist with directories for the ftp server."
  278.   :group 'hm--html-links
  279.   :type '(repeat cons))
  280.  
  281.  
  282. ;;; For links to gopher servers
  283.  
  284. (defcustom hm--html-gopher-hostname:port-alist
  285.   '(("newsserver.rrzn.uni-hannover.de:70")
  286.     ("solaris.rz.tu-clausthal.de:70")
  287.     ("veronica.scs.unr.edu:70")
  288.     ("pinus.slu.se:70")
  289.     ("sunic.sunet.se:70")
  290.     )
  291.   "*Alist with hostnames and ports for the gopher server."
  292.   :group 'hm--html-links
  293.   :type '(repeat string))
  294.  
  295. (defcustom hm--html-gopher-hostname:port-default
  296.   "newsserver.rrzn.uni-hannover.de:70"
  297.   "*Default hostname with port for the gopher server."
  298.   :group 'hm--html-links
  299.   :type 'string)
  300.  
  301. (defcustom hm--html-gopher-doctype-alist '(("/1")
  302.                     ("/11")
  303.                     ("/00"))
  304.   "*Alist with doctype strings for the gopher server."
  305.   :group 'hm--html-links
  306.   :type '(repeat string))
  307.  
  308. (defcustom hm--html-gopher-doctype-default "/1"
  309.   "*Default doctype string for the gopher server."
  310.   :group 'hm--html-links
  311.   :type 'string)
  312.  
  313. (defcustom hm--html-gopher-anchor-alist
  314.   '(("veronica")
  315.     ("Wide%20Area%20Information%20Services%20databases")
  316.     ("Subject%20Tree"))
  317.   "*Alist with directories for the gopher server."
  318.   :group 'hm--html-links
  319.   :type '(repeat string))
  320.  
  321.  
  322. ;;; For the links to the Program Gateway
  323.  
  324. (defcustom hm--html-proggate-hostname:port-alist
  325.   '(("www.tnt.uni-hannover.de:8007")
  326.     )
  327.   "*Alist with hostnames and ports for the proggate server."
  328.   :group 'hm--html-links
  329.   :type '(repeat string))
  330.  
  331. (defcustom hm--html-proggate-hostname:port-default
  332.   "www.tnt.uni-hannover.de:8007"
  333.   "*Default hostname with port for the proggate server."
  334.   :group 'hm--html-links
  335.   :type '(repeat string))
  336.  
  337. (defcustom hm--html-proggate-allowed-file "/appl/www/bin/proggate.allowed"
  338.   "*The filename (with path) of the proggate allowed file."
  339.   :group 'hm--html-links
  340.   :type 'file)
  341.  
  342.  
  343. ;;; For links to the Local Program Gatewy
  344.  
  345. (defcustom hm--html-local-proggate-path-alist '((1 . "/bin/")
  346.                         (2 . "/usr/bin/")
  347.                         (3 . "/usr/local/bin/")
  348.                         (4 . "/appl/util/bin/")
  349.                         (5 . "/appl/gnu/Global/bin/")
  350.                         (6 . "/")
  351.                         (7 . "/appl/")
  352.                         (8 . "~/appl/Global/bin/")
  353.                         (9 . "~/"))
  354.   "*Alist with directories for the local program gateway."
  355.   :group 'hm--html-links
  356.   :type '(repeat cons))
  357.  
  358.  
  359. ;;; For links to the mail gateway
  360.  
  361. (defcustom hm--html-mail-hostname:port-alist '(("www.tnt.uni-hannover.de:8003")
  362.                            )
  363.   "*Alist with hostnames and ports for the mail gateway."
  364.   :group 'hm--html-links
  365.   :type '(repeat string))
  366.  
  367. (defcustom hm--html-mail-hostname:port-default "www.tnt.uni-hannover.de:8003"
  368.   "*Default hostname with port for the mail gateway."
  369.   :group 'hm--html-links
  370.   :type 'string)
  371.  
  372. (defcustom hm--html-mail-path-alist '((1 . "~/data/docs/mail")
  373.                       (2 . "~/data/docs/news")
  374.                       (3 . "~/docs/mail")
  375.                       (4 . "~/docs/news")
  376.                       (5 . "~/mail")
  377.                       (6 . "~/news")
  378.                       (7 . "~/")
  379.                       (8 . "/data/info/mail")
  380.                       (9 . "/data/info/news")
  381.                       (10 . "/"))
  382.   "*Alist with directories for the mail gateway."
  383.   :group 'hm--html-links
  384.   :type '(repeat string))
  385.  
  386.  
  387. ;;; For mailto links
  388.  
  389. (defcustom hm--html-mailto-alist '(("muenkel@tnt.uni-hannover.de"))
  390.   "*Alist with mail adresses for the mailto alist.
  391. The value of `user-mail-address' will also be added by the package to
  392. this alist."
  393.   :group 'hm--html-links
  394.   :type '(repeat string))
  395.  
  396.  
  397. ;;; For the server side include directive
  398. ;;; not sure, if these directives works on any server
  399.  
  400. (defcustom hm--html-server-side-include-command-alist '(("/bin/date")
  401.                             ("/usr/bin/finger")
  402.                             ("/bin/df"))
  403.   "*Alist with commands for the server side include directive.
  404. These commands needs no parameter."
  405.   :group 'hm--html-links
  406.   :type '(repeat string))
  407.     
  408. (defcustom hm--html-server-side-include-command-with-parameter-alist
  409.   '(("/usr/bin/man")
  410.     ("/usr/bin/finger")
  411.     ("/usr/bin/ls")
  412.     ("/bin/cat"))
  413.   "*Alist with commands for the server side include directive.
  414. These commands needs parameters."
  415.   :group 'hm--html-links
  416.   :type '(repeat string))
  417.     
  418.  
  419. ;;; Alist with URL'S for FORMS and IMAGE tags
  420.  
  421. (defcustom hm--html-url-alist 
  422.   (list
  423.    '("http://hoohoo.ncsa.uiuc.edu/htbin-post/post-query"
  424.      POST)
  425.    '("http://hoohoo.ncsa.uiuc.edu/htbin/query"
  426.      GET)
  427.    (list 
  428.     (concat "http://" 
  429.         hm--html-favorite-http-server-host-name
  430.         "/")
  431.     'IMAGE))
  432.   "*Alist with URL's for FORMS and IMAGE tags. 
  433. The cdr of each list contains symbols, which specifys the use of the
  434. URL."
  435.   :group 'hm--html-links
  436.   :type '(repeat cons))
  437.  
  438.  
  439. ;;; For the marking of examples in the help buffer
  440.  
  441. (defcustom hm--html-help-foreground "red"
  442.   "The foreground color to highlight examples."
  443.   :group 'hm--html-links
  444.   :type 'string)
  445.  
  446. (defcustom hm--html-help-background nil
  447.   "The background color to highlight examples."
  448.   :group 'hm--html-links
  449.   :type 'string)
  450.  
  451. (defcustom hm--html-help-font (face-font 'bold)
  452.   "The font to highlight examples."
  453.   :group 'hm--html-links
  454.   :type 'string)
  455.  
  456.  
  457. ;;; For the Templates
  458.  
  459. (defcustom hm--html-template-dir "/data/info/www/tnt/guide/templates"
  460.   "*A directory with templatefiles.
  461. It is now also possible to use it as a list of directories.
  462. Look at the variable `tmpl-template-dir-list' for further descriptions."
  463.   :group 'hm--html-templates
  464.   :type 'directory)
  465.  
  466. (if (listp hm--html-template-dir)
  467.     (unless (file-exists-p (car hm--html-template-dir))
  468.       ;; Use a system directory, if the above one doesn't exist
  469.       ;; This may only be useful, in the XEmacs >= 19.12
  470.       (setq hm--html-template-dir (cons (concat data-directory
  471.                         "../lisp/hm--html-menus/")
  472.                     hm--html-template-dir)))
  473.   (unless (file-exists-p hm--html-template-dir)
  474.     ;; Use a system directory, if the above one doesn't exist
  475.     ;; This may only be useful, in the XEmacs >= 19.12
  476.     (setq hm--html-template-dir (concat data-directory
  477.                     "../lisp/hm--html-menus/"))))
  478.  
  479. (defcustom hm--html-frame-template-file (concat data-directory
  480.                          "../lisp/hm--html-menus/"
  481.                          "frame.html.tmpl")
  482.   "File, which is used as template for a html frame."
  483.   :group 'hm--html-templates
  484.   :type 'file)
  485.  
  486. (defcustom hm--html-automatic-expand-templates t
  487.   "*Automatic expansion of templates. This feature needs the file
  488. tmpl-minor-mode.el from Heiko Muenkel (muenkel@tnt.uni-hannover.de),
  489. which is distributed with the package hm--html-menus."
  490.   :group 'hm--html-templates
  491.   :type 'boolean)
  492.  
  493. (defcustom hm--html-template-filter-regexp ".*\\.html\\.tmpl$"
  494.   "*Regexp for filtering out non template files in a directory."
  495.   :group 'hm--html-templates
  496.   :type 'string)
  497.  
  498. ;;; for deleting the automounter path-prefix
  499. (defcustom hm--html-delete-wrong-path-prefix '("/tmp_mnt" "/phys/[^/]+")
  500.   "If non nil, it specifies path-prefixes, which should be deleted in pathes.
  501. The Sun automounter adds a temporary prefix to the automounted directories
  502.  (At our site the prefix is /tmp_mnt). But you can't select such a path, if 
  503. the automounter has currently not mounted the directory and so you can't
  504. follow a html-link, which consists of such a path. To overcome this behaviour,
  505. you can set this variable to the prefix (eg. \"/tmp_mnt\"). After that, the
  506. prefix should be stripped from the pathes during the creation of the links.
  507. ATTENTION: This variable is used as regular expression !
  508. It can be set to a string or to a list of strings."
  509.   :group 'hm--html-links
  510.   :type '(repeat string))
  511.  
  512.  
  513. ;;; For insertation of created and changed comments and automatic
  514. ;;; date update in the title line and a visible modification date
  515.  
  516. (defcustom hm--html-automatic-create-title-date t
  517.   "*t => A date string will be inserted in the title line.
  518. This will be updated each time before file saving, if
  519. `hm--html-automatic-update-title-date' is also set to t."
  520.   :group 'hm--html-document-information
  521.   :type 'boolean)
  522.  
  523. (defcustom hm--html-automatic-update-title-date t
  524.   "*t   => The date in the title line will be updated before filesaving.
  525. nil => No automatic update of the date."
  526.   :group 'hm--html-document-information
  527.   :type 'boolean)
  528.  
  529. (define-obsolete-variable-alias 'hm--html-automatic-new-date
  530.   'hm--html-automatic-update-title-date)
  531.  
  532. (defcustom hm--html-automatic-changed-comment t
  533.   "*t   => A \"changed comment\" line will be added before filesaving.
  534. nil => No automatic insertation of a \"changed comment\" line."
  535.   :group 'hm--html-document-information
  536.   :type 'boolean)
  537.  
  538. (defcustom hm--html-changed-comment-prefix "Changed by: "
  539.   "*The prefix text of the \"changed comment\" lines."
  540.   :group 'hm--html-document-information
  541.   :type 'string)
  542.  
  543. (defcustom hm--html-created-comment-prefix "Created by: "
  544.   "*The prefix text of the \"created comment\" lines."
  545.   :group 'hm--html-document-information
  546.   :type 'string)
  547.  
  548. (defcustom hm--html-comment-infix nil
  549.   "*The infix (second part) of the \"changed/created comment\" lines.
  550. By default, if this variable is nil, the username is used.
  551. Then the infix looks like \"Heiko Mⁿnkel, \".
  552. Set it to an empty string, if you don't want to have your name
  553. in the comments."
  554.   :group 'hm--html-document-information
  555.   :type '(choice (const :tag "Use The Username" :value nil)
  556.          string))
  557.  
  558. (defcustom hm--html-automatic-created-comment t
  559.   "*t   => A \"created comment\" line will be added.
  560. nil => No automatic insertation of a \"created comment\" line."
  561.   :group 'hm--html-document-information
  562.   :type 'boolean)
  563.  
  564. (defcustom hm--html-automatic-create-modified-line nil
  565.   "*t => Inserts a visible \"modified\" line with the current date.
  566. Visible means, that it is not a HTML comment."
  567.   :group 'hm--html-document-information
  568.   :type 'boolean)
  569.  
  570. (defcustom hm--html-automatic-update-modified-line nil
  571.   "*t => Updates a visible \"modified\" line with the current date.
  572. Visible means, that it is not a HTML comment."
  573.   :group 'hm--html-document-information
  574.   :type 'boolean)
  575.  
  576. (defcustom hm--html-modified-prefix "Modified: "
  577.   "*Prefix of the last modified entry."
  578.   :group 'hm--html-document-information
  579.   :type 'string)
  580.  
  581. (defcustom hm--html-modified-start-tag "<EM>"
  582.   "*Start tag of the modified line.
  583. If you change this, you'll need to change also
  584. `hm--html-modified-end-tag'."
  585.   :group 'hm--html-document-information
  586.   :type '(choice (const :tag "Emphasized" :value "<EM>")
  587.          (const :tag "Strong" :value "<STRONG>")
  588.          (const :tag "No Tags" :value "")
  589.          (const :tag "Bold" :value "<B>")
  590.          (const :tag "Italic" :value "<I>")
  591.          (const :tag "Typewriter" :value "<TT>")
  592.          (const :tag "Small" :value "<SMALL>")
  593.          (const :tag "Big" :value "<BIG>")
  594.          (const :tag "Underline" :value "<U>")
  595.          string))
  596.  
  597. (defcustom hm--html-modified-end-tag "</EM>"
  598.   "*End tag of the modified line.
  599. If you change this, you'll need to change also
  600. `hm--html-modified-start-tag'."
  601.   :group 'hm--html-document-information
  602.   :type '(choice (const :tag "Emphasized" :value "</EM>")
  603.          (const :tag "Strong" :value "</STRONG>")
  604.          (const :tag "No Tags" :value "")
  605.          (const :tag "Bold" :value "</B>")
  606.          (const :tag "Italic" :value "</I>")
  607.          (const :tag "Typewriter" :value "</TT>")
  608.          (const :tag "Small" :value "</SMALL>")
  609.          (const :tag "Big" :value "</BIG>")
  610.          (const :tag "Underline" :value "</U>")
  611.          string))
  612.  
  613. (defcustom hm--html-modified-insert-before "</body>"
  614.   "Insert modified line before this string.
  615. The search will be done from the end to the beginning."
  616.   :group 'hm--html-document-information
  617.   :type 'string)
  618.  
  619.  
  620. ;;; Keybindings:
  621.  
  622. (defcustom hm--html-bind-latin-1-char-entities t
  623.   "Set this to nil, if you don't want to use the ISO Latin 1 character entities.
  624. This is only useful, if `hm--html-use-old-keymap' is set to nil. It is only 
  625. used during loading the html package the first time."
  626.   :group 'hm--html-keys
  627.   :type 'boolean)
  628.  
  629.  
  630. ;;; The drag and drop interface
  631. (defcustom hm--html-idd-create-relative-links t
  632.   "If t, then the hm--html-idd-* functions are creating relative links.
  633. Otherwise absolute links are used. The idd functions are used for
  634. drag and drop."
  635.   :group 'hm--html-keys
  636.   :type 'boolean)
  637.  
  638. (defcustom hm--html-idd-actions
  639.   '((nil (((idd-if-major-mode-p . dired-mode)
  640.        (idd-if-dired-file-on-line-p . ".*\\.\\(gif\\)\\|\\(jpg\\)"))
  641.       hm--html-idd-add-include-image-from-dired-line)
  642.      (((idd-if-major-mode-p . dired-mode)
  643.        (idd-if-dired-no-file-on-line-p . nil))
  644.       hm--html-idd-add-file-link-to-file-on-dired-line)
  645.      (((idd-if-major-mode-p . dired-mode)
  646.        (idd-if-dired-no-file-on-line-p . t))
  647.       hm--html-idd-add-file-link-to-directory-of-buffer)
  648.      (((idd-if-major-mode-p . w3-mode)
  649.        (idd-if-url-at-point-p . t))
  650.       hm--html-idd-add-html-link-from-w3-buffer-point)
  651.      (((idd-if-major-mode-p . w3-mode))
  652.       hm--html-idd-add-html-link-to-w3-buffer)
  653.      (((idd-if-local-file-p . t))
  654.       hm--html-idd-add-file-link-to-buffer)))
  655.   "The action list for the destination mode `hm--html-mode'.
  656. Look at the description of the variable idd-actions."
  657.   :group 'hm--html-keys
  658.   :type 'list)
  659.  
  660.  
  661. ;;; The font lock keywords
  662.  
  663. (defcustom hm--html-font-lock-keywords-1
  664.   (list
  665.    '("<!--.*-->" . font-lock-comment-face)
  666.    '("<[^>]*>" . font-lock-keyword-face)
  667. ;   '("<[^>=]*href[ \t\n]*=[ \t\n]*\"\\([^\"]*\\)\"" 1 font-lock-string-face t)
  668. ;   '("<[^>=]src[ \t\n]*=[ \t\n]*\"\\([^\"]*\\)\"" 1 font-lock-string-face t)
  669.    '("<[^>=]*\\(href\\|src\\)[ \t\n]*=[ \t\n]*\"\\([^\"]*\\)\"" 
  670.      2 font-lock-string-face t))
  671.   "Subdued level highlighting for hm--html-mode."
  672.   :group 'hm--html-display
  673.   :type '(repeat cons))
  674.  
  675. (defcustom hm--html-font-lock-keywords-2
  676.   (append hm--html-font-lock-keywords-1
  677.       (list
  678.        '(">\\([^<]+\\)</a>" 1 font-lock-reference-face)
  679.        '("</b>\\([^<]+\\)</b>" 1 bold)
  680.        '("</i>\\([^<]+\\)</i>" 1 italic)
  681.        ))
  682.   "Gaudy level highlighting for hm--html-mode."
  683.   :group 'hm--html-display
  684.   :type '(repeat cons))
  685.  
  686. (defcustom hm--html-font-lock-keywords hm--html-font-lock-keywords-1
  687.   "Default expressions to highlight in the hm--html-mode."
  688.   :group 'hm--html-display
  689.   :type '(repeat cons))
  690.  
  691.  
  692.  
  693. ;;; The Prefix- Key for the keytables
  694. (defcustom hm--html-minor-mode-prefix-key "\C-z"
  695.   "The prefix key for the keytables in the `hm--html-minor-mode'."
  696.   :group 'hm--html-keys
  697.   :type 'string)
  698.  
  699. (defcustom hm--html-mode-prefix-key "\C-c"
  700.   "The prefix key for the hm--html keys in the `hm--html-mode'."
  701.   :group 'hm--html-keys
  702.   :type 'string)
  703.  
  704.  
  705. ;;; The pulldown menu names
  706. (defcustom hm--html-minor-mode-pulldown-menu-name "HM-HTML"
  707.   "The name of the pulldown menu in the minor html mode."
  708.   :group 'hm--html-menus
  709.   :type 'string
  710.   )
  711.  
  712. (defcustom hm--html-mode-pulldown-menu-name "HTML"
  713.   "The name of the pulldown menu in the major html mode."
  714.   :group 'hm--html-menus
  715.   :type 'string)
  716.  
  717.  
  718. ;;; The hook variables
  719. (defcustom hm--html-load-hook nil
  720.   "*Hook variable to execute functions after loading the package."
  721.   :group 'hm--html-hooks
  722.   :type 'hook)
  723.  
  724. (defcustom hm--html-mode-hook nil
  725.   "*This hook will be called each time, when the hm--html-mode is invoked."
  726.   :group 'hm--html-hooks
  727.   :type 'hook)
  728.  
  729.  
  730. ;;; For the file html-view.el
  731. ;;; There are also some other variables in hmtl-view.el
  732. ;;; Look at that file, if you've trouble with the functions
  733. ;;; to preview the html document with the Mosaic
  734. (defcustom html-view-mosaic-command "/sol/www/bin/mosaic"
  735.   "The command that runs Mosaic on your system."
  736.   :group 'hm--html-display
  737.   :type '(choice (const :tag "mosaic" :value "mosaic")
  738.          (const :value "/usr/local/bin/mosaic")
  739.          file))
  740.  
  741. (defcustom html-sigusr1-signal-value 16
  742.   "Value for the SIGUSR1 signal on your system.  
  743. See, usually, /usr/include/sys/signal.h.
  744.      SunOS 4.1.x    : (setq html-sigusr1-signal-value 30)
  745.     SunOS 5.x    : (setq html-sigusr1-signal-value 16)
  746.     Linux        : (setq html-sigusr1-signal-value 10))"
  747.   :group 'hm--html-display
  748.   :type '(choice (const :tag "On SunOS 4.1.x" :value 30)
  749.          (const :tag "On SunOS 5.x" :value 16)
  750.          (const :tag "On Linux" :value 10)
  751.          integer))
  752.  
  753.  
  754. ;;; Meta information
  755. (defcustom hm--html-meta-name-alist '(("Expires") ("Keys") ("Author"))
  756.   "*Alist with possible names for the name or http-equiv attribute of meta."
  757.   :group 'hm--html-document-information
  758.   :type '(repeat (list (choice (const "Expires")
  759.                    (const "Keys")
  760.                    (const "Author")
  761.                    string))))
  762.  
  763. ;;; indentation
  764.  
  765. (defcustom hm--html-disable-indentation nil
  766.   "*Set this to t, if you want to disable the indentation in the hm--html-mode.
  767. And may be send me (muenkel@tnt.uni-hannover.de) a note, why you've
  768. done this."
  769.   :group 'hm--html-indentation
  770.   :type 'boolean)
  771.  
  772. (defcustom hm--html-inter-tag-indent 2
  773.   "*The indentation after a start tag."
  774.   :group 'hm--html-indentation
  775.   :type 'integer)
  776.  
  777. (defcustom hm--html-comment-indent 5
  778.   "*The indentation of a comment."
  779.   :group 'hm--html-indentation
  780.   :type 'integer)
  781.  
  782. (defcustom hm--html-intra-tag-indent 2
  783.   "*The indentation after the start of a tag."
  784.   :group 'hm--html-indentation
  785.   :type 'integer)
  786.  
  787. (defcustom hm--html-tag-name-alist
  788.   '(("!--" (:hm--html-one-element-tag t)
  789.      (:hm--html-required-attributes nil)
  790.      (:hm--html-optional-attributes nil))
  791.     ("!doctype" (:hm--html-one-element-tag t)
  792.      (:hm--html-required-attributes nil)
  793.      (:hm--html-optional-attributes nil))
  794.     ("isindex" (:hm--html-one-element-tag t)
  795.      (:hm--html-required-attributes nil)
  796.      (:hm--html-optional-attributes (prompt)))
  797.     ("base" (:hm--html-one-element-tag t)
  798.      (:hm--html-required-attributes (href))
  799.      (:hm--html-optional-attributes nil))
  800.     ("meta" (:hm--html-one-element-tag t)
  801.      (:hm--html-required-attributes (content))
  802.      (:hm--html-optional-attributes (http-equiv name)))
  803.     ("link" (:hm--html-one-element-tag t)
  804.      (:hm--html-required-attributes nil)
  805.      (:hm--html-optional-attributes (href rel rev title)))
  806.     ("hr" (:hm--html-one-element-tag t)
  807.      (:hm--html-required-attributes nil)
  808.      (:hm--html-optional-attributes (align noshade size width)))
  809.     ("input" (:hm--html-one-element-tag t)
  810.      (:hm--html-required-attributes nil)
  811.      (:hm--html-optional-attributes
  812.       (type name value checked size maxlength src align)))
  813.     ("img" (:hm--html-one-element-tag t)
  814.      (:hm--html-required-attributes (src))
  815.      (:hm--html-optional-attributes
  816.       (alt align height width border hspace vspace usemap ismap)))
  817.     ("param" (:hm--html-one-element-tag t)
  818.      (:hm--html-required-attributes (name))
  819.      (:hm--html-optional-attributes (value)))
  820.     ("br" (:hm--html-one-element-tag t)
  821.      (:hm--html-required-attributes nil)
  822.      (:hm--html-optional-attributes (clear)))
  823.     ("basefont" (:hm--html-one-element-tag t)
  824.      (:hm--html-required-attributes nil)
  825.      (:hm--html-optional-attributes size))
  826.     ("area" (:hm--html-one-element-tag t)
  827.      (:hm--html-required-attributes (alt))
  828.      (:hm--html-optional-attributes (shape coords href nohref)))
  829.     ("option" (:hm--html-one-element-tag t)
  830.      (:hm--html-required-attributes nil)
  831.      (:hm--html-optional-attributes (selected value)))
  832.  
  833.     ("html" (:hm--html-two-element-tag t)
  834.      (:hm--html-required-attributes nil)
  835.      (:hm--html-optional-attributes nil))
  836.     ("head" (:hm--html-two-element-tag t)
  837.      (:hm--html-required-attributes nil)
  838.      (:hm--html-optional-attributes nil))
  839.     ("body" (:hm--html-two-element-tag t)
  840.      (:hm--html-required-attributes nil)
  841.      (:hm--html-optional-attributes (bgcolor text link vlink alink background))
  842.      )
  843.     ("h1" (:hm--html-two-element-tag t)
  844.      (:hm--html-required-attributes nil)
  845.      (:hm--html-optional-attributes (align)))
  846.     ("h2" (:hm--html-two-element-tag t)
  847.      (:hm--html-required-attributes nil)
  848.      (:hm--html-optional-attributes (align)))
  849.     ("h3" (:hm--html-two-element-tag t)
  850.      (:hm--html-required-attributes nil)
  851.      (:hm--html-optional-attributes (align)))
  852.     ("h4" (:hm--html-two-element-tag t)
  853.      (:hm--html-required-attributes nil)
  854.      (:hm--html-optional-attributes (align)))
  855.     ("h5" (:hm--html-two-element-tag t)
  856.      (:hm--html-required-attributes nil)
  857.      (:hm--html-optional-attributes (align)))
  858.     ("h6" (:hm--html-two-element-tag t)
  859.      (:hm--html-required-attributes nil)
  860.      (:hm--html-optional-attributes (align)))
  861.     ("address" (:hm--html-two-element-tag t)
  862.      (:hm--html-required-attributes nil)
  863.      (:hm--html-optional-attributes nil))
  864.     ("p" (:hm--html-one-or-two-element-tag t)
  865.      (:hm--html-required-attributes nil)
  866.      (:hm--html-optional-attributes (align)))
  867.     ("ul" (:hm--html-two-element-tag t)
  868.      (:hm--html-required-attributes nil)
  869.      (:hm--html-optional-attributes (type compact)))
  870.     ("ol" (:hm--html-two-element-tag t)
  871.      (:hm--html-required-attributes nil)
  872.      (:hm--html-optional-attributes (type start compact)))
  873.     ("dl" (:hm--html-two-element-tag t)
  874.      (:hm--html-required-attributes nil)
  875.      (:hm--html-optional-attributes (compact)))
  876.     ("li" (:hm--html-one-or-two-element-tag t)
  877.      (:hm--html-required-attributes nil)
  878.      (:hm--html-optional-attributes (type (value "ol"))))
  879.     ("dt" (:hm--html-one-or-two-element-tag t)
  880.      (:hm--html-required-attributes nil)
  881.      (:hm--html-optional-attributes nil))
  882.     ("dd" (:hm--html-one-or-two-element-tag t)
  883.      (:hm--html-required-attributes nil)
  884.      (:hm--html-optional-attributes nil))
  885.     ("dir" (:hm--html-two-element-tag t)
  886.      (:hm--html-required-attributes nil)
  887.      (:hm--html-optional-attributes (compact)))
  888.     ("menu" (:hm--html-two-element-tag t)
  889.      (:hm--html-required-attributes nil)
  890.      (:hm--html-optional-attributes (compact)))
  891.     ("pre" (:hm--html-two-element-tag t)
  892.      (:hm--html-required-attributes nil)
  893.      (:hm--html-optional-attributes (width)))
  894.     ("div" (:hm--html-two-element-tag t)
  895.      (:hm--html-required-attributes nil)
  896.      (:hm--html-optional-attributes (align)))
  897.     ("center" (:hm--html-two-element-tag t)
  898.      (:hm--html-required-attributes nil)
  899.      (:hm--html-optional-attributes nil))
  900.     ("blockquote" (:hm--html-two-element-tag t)
  901.      (:hm--html-required-attributes nil)
  902.      (:hm--html-optional-attributes nil))
  903.     ("form" (:hm--html-two-element-tag t)
  904.      (:hm--html-required-attributes nil)
  905.      (:hm--html-optional-attributes (action method enctype)))
  906.     ("select" (:hm--html-two-element-tag t)
  907.      (:hm--html-required-attributes (name))
  908.      (:hm--html-optional-attributes (size multiple)))
  909.     ("textarea" (:hm--html-two-element-tag t)
  910.      (:hm--html-required-attributes (name rows cols))
  911.      (:hm--html-optional-attributes nil))
  912.     ("table" (:hm--html-two-element-tag t)
  913.      (:hm--html-required-attributes nil)
  914.      (:hm--html-optional-attributes
  915.       (align width border cellspacing cellpading)))
  916.     ("caption" (:hm--html-two-element-tag t)
  917.      (:hm--html-required-attributes nil)
  918.      (:hm--html-optional-attributes (align)))
  919.     ("tr" (:hm--html-one-or-two-element-tag t)
  920.      (:hm--html-required-attributes nil)
  921.      (:hm--html-optional-attributes (align valign)))
  922.     ("th" (:hm--html-one-or-two-element-tag t)
  923.      (:hm--html-required-attributes nil)
  924.      (:hm--html-optional-attributes
  925.       (nowrap rowspan colspan align valign width height)))
  926.     ("td" (:hm--html-one-or-two-element-tag t)
  927.      (:hm--html-required-attributes nil)
  928.      (:hm--html-optional-attributes
  929.       (nowrap rowspan colspan align valign width height)))
  930.     ("tt" (:hm--html-two-element-tag t)
  931.      (:hm--html-required-attributes nil)
  932.      (:hm--html-optional-attributes nil))
  933.     ("i" (:hm--html-two-element-tag t)
  934.      (:hm--html-required-attributes nil)
  935.      (:hm--html-optional-attributes nil))
  936.     ("b" (:hm--html-two-element-tag t)
  937.      (:hm--html-required-attributes nil)
  938.      (:hm--html-optional-attributes nil))
  939.     ("u" (:hm--html-two-element-tag t)
  940.      (:hm--html-required-attributes nil)
  941.      (:hm--html-optional-attributes nil))
  942.     ("strike" (:hm--html-two-element-tag t)
  943.      (:hm--html-required-attributes nil)
  944.      (:hm--html-optional-attributes nil))
  945.     ("big" (:hm--html-two-element-tag t)
  946.      (:hm--html-required-attributes nil)
  947.      (:hm--html-optional-attributes nil))
  948.     ("small" (:hm--html-two-element-tag t)
  949.      (:hm--html-required-attributes nil)
  950.      (:hm--html-optional-attributes nil))
  951.     ("sub" (:hm--html-two-element-tag t)
  952.      (:hm--html-required-attributes nil)
  953.      (:hm--html-optional-attributes nil))
  954.     ("sup" (:hm--html-two-element-tag t)
  955.      (:hm--html-required-attributes nil)
  956.      (:hm--html-optional-attributes nil))
  957.     ("em" (:hm--html-two-element-tag t)
  958.      (:hm--html-required-attributes nil)
  959.      (:hm--html-optional-attributes nil))
  960.     ("strong" (:hm--html-two-element-tag t)
  961.      (:hm--html-required-attributes nil)
  962.      (:hm--html-optional-attributes nil))
  963.     ("dfn" (:hm--html-two-element-tag t)
  964.      (:hm--html-required-attributes nil)
  965.      (:hm--html-optional-attributes nil))
  966.     ("code" (:hm--html-two-element-tag t)
  967.      (:hm--html-required-attributes nil)
  968.      (:hm--html-optional-attributes nil))
  969.     ("samp" (:hm--html-two-element-tag t)
  970.      (:hm--html-required-attributes nil)
  971.      (:hm--html-optional-attributes nil))
  972.     ("kbd" (:hm--html-two-element-tag t)
  973.      (:hm--html-required-attributes nil)
  974.      (:hm--html-optional-attributes nil))
  975.     ("var" (:hm--html-two-element-tag t)
  976.      (:hm--html-required-attributes nil)
  977.      (:hm--html-optional-attributes nil))
  978.     ("cite" (:hm--html-two-element-tag t)
  979.      (:hm--html-required-attributes nil)
  980.      (:hm--html-optional-attributes nil))
  981.     ("a" (:hm--html-two-element-tag t)
  982.      (:hm--html-required-attributes nil)
  983.      (:hm--html-optional-attributes (name href rel rev title)))
  984.     ("applet" (:hm--html-two-element-tag t)
  985.      (:hm--html-required-attributes (code width height))
  986.      (:hm--html-optional-attributes (codebase alt name align hspace vspace)))
  987.     ("font" (:hm--html-two-element-tag t)
  988.      (:hm--html-required-attributes nil)
  989.      (:hm--html-optional-attributes (size color)))
  990.     ("map" (:hm--html-two-element-tag t)
  991.      (:hm--html-required-attributes (name))
  992.      (:hm--html-optional-attributes nil))
  993.     ("style" (:hm--html-two-element-tag t)
  994.      (:hm--html-required-attributes nil)
  995.      (:hm--html-optional-attributes nil))
  996.     ("script" (:hm--html-two-element-tag t)
  997.      (:hm--html-required-attributes nil)
  998.      (:hm--html-optional-attributes nil))
  999.     )
  1000.   "An alist with tag names known by the `hm--html-mode'.
  1001. CURRENTLY THIS LIST MIGHT NOT CONTAIN ALL TAGS!!!!.
  1002.  
  1003. It is used to determine, if a tag is a one element tag or not.
  1004.  
  1005. In the future it should also be used to get possible parameters of
  1006. the tag.
  1007.  
  1008. Use lower case characters in this list!!!!"
  1009.   :group 'hm--html-indentation
  1010.   :type 'list)
  1011. ;  :type '(repeat lisp))
  1012. ;  :type '(repeat (list string
  1013. ;               (list (const
  1014. ;                :tag "Element with one tag"
  1015. ;                :value (:hm--html-one-element-tag t))
  1016. ;                   (const
  1017. ;                :tag "Element with two tags"
  1018. ;                :value (:hm--html-two-element-tag t))
  1019. ;                   (const
  1020. ;                :tag "Element with one or two tags"
  1021. ;                :value (:hm--html-one-or-two-element-tag t))
  1022. ;                   )
  1023. ;               (list :format "%t%v"
  1024. ;                 :tag ""
  1025. ;                 (const :format ""
  1026. ;                    :value :hm--html-required-attributes)
  1027. ;                 (repeat :tag "Repeat Required Attributes"
  1028. ;                     symbol))
  1029. ;               (list :format "%t%v"
  1030. ;                 :tag ""
  1031. ;                 (const :format ""
  1032. ;                    :value :hm--html-optional-attributes)
  1033. ;                 (repeat :tag "Repeat Optional Attributes"
  1034. ;                     symbol))
  1035. ;               )))
  1036.  
  1037.  
  1038. ;;; Announce the feature hm--html-configuration
  1039. (provide 'hm--html-configuration)
  1040.  
  1041.